<?php
class Core_Library_Message extends Core_Library_Model{
       public function sendMessage($vars, $values) {
        if (is_array($vars)) {
            $vars = implode(', ', $vars);
        }
        if (is_array($values)) {
            $values = implode("', '", $values);
        }
        $values = "('" . $values . "')";
        $sql = 'insert into messages(' . "{$vars}" . ') values ' . "{$values}" . ';';
        // echo $sql; die;
        mysql_query($sql) or die(mysql_error());

        // mysql_query($sql) or die (mysql_error());
    }
    public  function showMessage(){
        $this->getData($vars, $tableName, $param, $value);
    }
}